#!/bin/bash

WGON(){
  echo "VPN"
  WGS='true'
}

WGOFF(){
#  echo "Off"
  WGS='false'
}

ifconfig n2400 &>/dev/null && WGON ||WGOFF

if [ "$1" = '-toggle' ]; then
  if [ "$WGS" = 'true' ]; then
    sudo wg-quick down n2400 &>/dev/null
  else
    sudo wg-quick up n2400 &>/dev/null
  fi
fi

exit 0
